i) Field of the Invention
The present invention relates generally to image encoding systems and, more particularly, to motion compensation predicting coding systems.
ii) Description of the Prior Art
FIG. 1 shows a conventional motion compensation predicting coding apparatus, as disclosed in xe2x80x9cA Study on HDTV Signal Coding with Motion Adaptive Noise Reductionxe2x80x9d by S. Nogaki, M. Ohta and T. Omachi, The Third HDTV International Workshop Preliminary Report, Vol. 3, 1989. The conventional motion compensation predicting coding apparatus encodes a digital image signal 101 to produce a coded signal 106 that is sent over a transmission line 109. The conventional motion compensation predicting coding apparatus includes a frame memory 1, a motion detector 2, a subtracter 3, a coder 4, a local decoder 5, an adder 6 and a multiplexer (MUX) 7. At a destination, the coded data is decoded to reproduce the original image signal 101. The destination has an architecture similar to that shown in FIG. 1, except that the destination in configured to decode rather than encode.
Before discussing the operation of the conventional coding apparatus, it is helpful to review the format of the image data to be encoded. An image may be viewed as being made of a number of picture elements for pixels. Each of these pixels has a certain level of luminance that is encoded according to a grey scale or other scale. The luminance for each pixel may be encoded into a digital signal. The digital signals for an entire screen of the display form a frame. This frame may be broken down into rows of pixels. Since many video displays, such as conventional cathode ray tubes, scan odd numbered rows in a first pass and even numbered rows in a second pass when generating an image (i.e., interlaced scanning), it is helpful to view the frame as being composed of an even field having data for even numbered rows and an odd field having data for odd numbered rows. Each of the fields (i.e., the odd field and the even field) may be further divided into blocks of pixel data such as regions of 8 pixels by 8 pixels.
The conventional motion compensation predicting coding apparatus operates as follows. An input image signal 101 or, for example, a digital signal encoding the luminances of pixels in a frame is provided in accordance with an interlaced scanning format. In the interlaced scanning format, the odd rows of pixels are first scanned and then the even rows of pixels are scanned. Hence, the input signal provides a sequence of pixel data beginning with the data for all of the odd rows which is followed by the data for all of the even rows. For purposes of the present discussion, it is assumed that the input image signal 101 is already organized into blocks. Each block is made of pixels of the same field. The system operates on a block at a time until all the blocks of a given field are encoded. The system then proceeds to encode the blocks of the other field in a frame. Once a frame is fully encoded, the process of encoding is repeated with a next frame.
The input image signal 101 of the present frame is compared with the image signals for the same field in a preceding frame to carry out motion detection. For instance, suppose a first block in the input image signal 101 encodes luminance information for a block of pixels in the odd field of a present frame. The motion detection of this first block is performed in the motion detector 2 by searching for the most analogous block in the neighboring blocks 102 in the previous frame that are positioned around the corresponding position of the first block. The neighboring blocks 102 are read out of the frame memory 1 and provided to the motion detector 2. The frame memory 1, stores image data (of local decoded signals 108) which has been locally decoded in the local decoder 5 and which has been summed with a motion compensation signal 104 in the adder 6. The frame memory 1 may be realized as a conventional RAM.
The motion detector 2 determines the similarities between the present block and the respective neighboring blocks to select the most analogous neighboring blocks. As a yardstick of similarity, the motion detector 2 may calculate a different absolute value sum between blocks that is obtained by summing absolute values of each difference in luminance values for the corresponding pixels in the blocks, or the motion detector may calculate a differential square sum that is obtained by summing square values of differences in luminance values between the corresponding pixels in the blocks.
Once the most analogous neighboring block is found, the motion detector 2 calculates and outputs a motion vector 103 to the frame memory 1 and the MUX 7. The motion vector indicates the vector displacement difference between the most analogous neighboring block and the first block. This motion vector 103 includes vector components in the horizontal and vertical directions. Also, once the most analogous neighboring block is found, a motion compensation prediction signal 104 that encodes the illuminance of the pixels of the most analogous neighboring block is read out of the frame memory 1 and sent to a subtracter 3.
The subtracter 3 subtracts the motion compensation prediction signal 104 from the input image signal 101 to obtain a prediction error signal 105. In particular, the illuminance of each pixel in the motion compensation prediction signal is subtracted from the illuminance of each corresponding pixel in the input image signal 101. Chips for performing the subtraction are commercially available. The subtracter 3 then outputs the prediction error signal 105 to the coder 4. The coder 4 executes the coding of the prediction error signal 105 to remove spatial redundancy in the signal. The coder 4, thus, helps to compress the prediction error signal 105. The signal 105 includes both low frequency components and high frequency components. Usually, in compressing the prediction error signal 105, the coder 4 quantizes the low frequency components of the signal 105 using many bits and quantizes the high frequency components using few bits. More bits are used in the encoding of the low frequency components because the low frequency components typically have much grater power than do the high frequency components. Assigning more bits to the low frequency components enhances coding efficiency and reduces image degradation. The coder 4, may perform, for example, an orthogonal transformation, such as a discrete cosine transformation (DCT), on an 8xc3x978 pixel block to effect a frequency conversion that results in scalar quantization of a conversion factor. Scalar-quantized coded data 106 for the block is then sent from the coder 4 to the local decoder 5 and to the MUX 7.
The MUX 7 not only multiplexes the coded data 106 and the motion vector 103 but also encodes the data in a format proper for sending the data down the transmission line 109. The local decoder 5 performs a reciprocal operation to that performed by the coder 4. In particular, an inverse scalar quantization or an inverse orthogonal transformation is carried out to obtain a decoded error signal 107. The adder 6 adds the motion compensation predicting signal 104 to the decoded error signal 107 to obtain the local decoded signal 108, which corresponds to the input image signal 101. Chips for implementing the adder 6 are well known in the art. The local decoded signal 108 is stored in the frame memory 1. The local decoded signal is subsequently read out of the frame memory 1 for use in carrying out the motion detection of the odd field in the next frame.
For the even field of the input image signal 101, the motion detection in the motion detector 2, the coding in the coder 4, and so forth are carried out in the same manner as described above with respect to the odd field.
In the conventional motion compensation predicting coding apparatus, as described above, the removal of the temporal redundancy included in the motion image signal is carried out by motion compensation predicting coding and by using an appropriate technique such as an orthogonal transformation, differential pulse code modulation (DPCM), vector quantization or the like. As described above, in the conventional motion compensation predicting coding apparatus, the correlation of the data in the same field is utilized. However, the temporal correlation between continuous different fields subjected to the interlaced scanning is not used, and, hence, the coding efficiency is low.
It is, therefore, a general object of the present invention to provide a more efficient motion compensating predicting coding method and apparatus.
The foregoing objects and other objects and advantages will be realized by the present invention in which a motion compensation predicting coding apparatus encodes pixel data of an image signal. The image signal includes pixel data organized into a even field and odd field for a portion of an image. The apparatus includes a motion detector for comparing the pixel data in the image signal with pixel data of a previous image signal. The motion detector generates a motion vector that is indicative of the displacement differences between the image signal and the previous image signal.
The motion compensation predicting coding apparatus also includes a subtracter for generating a prediction compensation error signal by subtracting the pixel data in the previous image signal from the pixel data of the current image signal. The resulting prediction compensation error signal is passed through an adaptive blocking mechanism that organizes the data of the prediction compensation error signal into blocks in one of several fashions. The blocking strategy is chosen as dictated by the motion vector. The blocking mechanism generates a blocked output that is fed to a coder and encoded.
The motion compensation predicting coding apparatus may alternatively include a field composer for composing the odd field pixel data in the incoming image signal with even field pixel data in the incoming image signal to produce as composed image signal. This composed image signal has pixel data for both the even and odd fields. This composed image signal is used by the motion detector in determining the motion vectors. Thus, in this alternative embodiment, the motion detection is not carried out strictly on single field blocks but rather is carried out on field composed blocks.
The coder for encoding output may include several components. First, the code may include a transformation means for performing an orthogonal transformation on the prediction error signal to produce a coefficient matrix. Second, the coder may include a quantizer for quantizing the coefficients from the coefficient matrix and a scanning controller for controlling what order the coefficients are scanned from the coefficient matrix and passed to the quantizer. This order is preferably controlled by the motion vectors. In particular, the motion vectors indicate whether there will be large horizontal components or large vertical components that are most efficiently quantized by altering the scanning order of the coefficient matrix. These elements may be used in conjunction with the above-described components.